#ifndef _RUNSERVER_H_
#define _RUNSERVER_H_

#ifdef __Win32__
#pragma warning(disable:4786)
#endif

#ifdef WIN32
	#define DEFAULT_CONFIG_FILE	"..\\..\\config\\config.xml"
#else
	#define DEFAULT_CONFIG_FILE	"../../config/config.xml"
#endif

int		InitializeServer(const char *pConfig,bool vEnableRTSP = false);
int		DestroyServer();

int		RunServer(const char *pConfig);
void	ServerVersion();

#ifdef WIN32
#include <windows.h>
#define SERVICENAME "MG Media Server"
void InstallService(char* inServiceName);
void RemoveService(char *inServiceName);
void RunAsService(char* inServiceName);
void WINAPI ServiceMain(DWORD argc, LPTSTR *argv);
#endif

#endif	//_RUNSERVER_H_
